function menu()
{
	var jobMenus1 = [ 
        {text:'系統參數',iconCls:'menu-item',href:'/Sunlike/Setting/System/param.jsp'},
 	    {text:'公司基本資料',iconCls:'menu-item',href:'/Sunlike/Setting/System/basic.jsp'}
 	];
	var jobMenus2 = [
	    {text:'新增員工',iconCls:'menu-item',href:'/Sunlike/Setting/User/add.jsp'},
	    {text:'帳戶管理',iconCls:'menu-item',href:'/Sunlike/Setting/User/list.jsp'},
		{text:'通訊錄顯示順序',iconCls:'menu-item',href:'/Sunlike/Setting/User/sort.jsp'}
	];
	var jobMenus3 = [
	    {text:'組織作業',iconCls:'menu-item',href:'/Sunlike/Setting/Division/list.jsp'},
   	    {text:'建立新部門',iconCls:'menu-item',href:'/Sunlike/Setting/Division/add.jsp'},
   	    {text:'部門排序與組織圖',iconCls:'menu-item',href:'/Sunlike/Setting/Division/sort.jsp'}
	];
	var jobMenus4 = [
   	    {text:'全部代理人清單',iconCls:'menu-item'},
   	    {text:'線上代理人清單',iconCls:'menu-item'},
   		{text:'新增代理人',iconCls:'menu-item'}
	];
	
	var jobMenus5 = [
	            	    {text:'公務交流區',iconCls:'menu-item'},
	            	    {text:'文件中心',iconCls:'menu-item'}
	         	];
	
	var jobMenus6 = [
	            	    {text:'行政人事',iconCls:'menu-item',href:'jobMenuAction.initPAMenuData.action'},
	            	    {text:'總帳系統',iconCls:'menu-item'},
	            		{text:'進銷存',iconCls:'menu-item'},
	            		{text:'收付賬款',iconCls:'menu-item'}
	         	];
	
	var jobMenus7 = [
	            	    {text:'權限設定',iconCls:'menu-item',href:'/Sunlike/Setting/Module/permission.jsp'}
	            	    ];
	var jobMenus8 = [
	            	    {text:'我的工作台',iconCls:'menu-item'},
	            	    {text:'登出系統',iconCls:'menu-item'}
	            	    ];
	new Ext.Panel({
		renderTo:'toolbarspan',
		id:'MENUMyJob',
	    tbar:[{
	    	id:'JOB-MENU-1',
	    	text:'系統設定',
	    	menu:jobMenus1,
	    	iconCls:'menu'
	    },'-',{
	    	id:'JOB-MENU-2',
	    	text:'帳戶設定',
	    	menu:jobMenus2,
	    	iconCls:'menu'
	    },'-',{
	    	id:'JOB-MENU-3',
	    	text:'組織設定',
	    	menu:jobMenus3,
	    	iconCls:'menu'
	    },'-',{
	    	id:'JOB-MENU-4',
	    	text:'代理平台',
	    	menu:jobMenus4,
	    	iconCls:'menu'
	    },'-',{
	    	id:'JOB-MENU-5',
	    	text:'封存歷史資料',
	    	menu:jobMenus5,
	    	iconCls:'menu'
	    },'-',{
	    	id:'JOB-MENU-6',
	    	text:'表單設定',
	    	menu:jobMenus6,
	    	iconCls:'menu'
	    },'-',{
	    	id:'JOB-MENU-7',
	    	text:'模組設定',
	    	menu:jobMenus7,
	    	iconCls:'menu'
	    },'-',{
	    	id:'JOB-MENU-8',
	    	text:'系統',
	    	menu:jobMenus8,
	    	iconCls:'menu'
	    },'->',{
	    	id:'JOB-MENU-9',
	    	text:'系統設定',
	    	enableToggle: true,
	    	pressed: true,
	    	toggleHandler: onItemToggle,
	    	iconCls:'back'
	    }]
	});
}

function onItemClick(item){
	
}

function onItemToggle(item){
	location.href="priviledgeAction.initPriviledge.action?id=Setting&moduleId=80";
}

Ext.onReady(menu);